package com.ww.scala.syntax

import java.util

/**
 * 集合
 */
object lesson04_trait {

  def main(args: Array[String]): Unit = {
    val p = new Persion("憨憨")
    p.sy()
    p.say
    p.ku
    p.haiRen()
  }


}

trait God {
  def say = println("God say")
}

trait Mg {
  def ku = println("Mg ku")
  def haiRen()
}

class Persion(name: String) extends God with Mg {
  def sy() = {
    println(s"我是$name")
  }

  override def haiRen(): Unit = {
    println("我是害人测实现")
  }
}
